In this tutorial you will learn how EntraPT can be used in practice to:

  • interpret the residual strain measured in several inclusions

  • calculate the residual pressure and the entrapment conditions evaluating the uncertainties for each step of the calculation

  • store all of the data in a consistent way and use them for further analysis

In this example we will use on the data published by Bonazzi et al. [2019], obtained from hydrothermal synthesis experiments with a piston-cylinder press to produce quartz inclusions in pure almandine garnet (>99%) at eclogite facies metamorphic conditions. In the study two experiments were performed and labelled Alm-1 (synthesis performed at P = 3.0 GPa and T= 775 °C) and Alm-2 (at P= 2.5 GPa and T= 800 °C). From each experiment they recovered several host crystals, each containing one or more crystals of quartz as inclusions. Isolated, fully-enclosed quartz inclusions in the recovered garnets were then investigated using micro-Raman spectroscopy.

The changes in the Raman peak positions were measured at the central point of the inclusion and interpreted by applying the phonon-mode Grüneisen tensors of quartz [Murri et al., 2018] to obtain the full strain state of each inclusion, using the program stRAinMAN [Angel et al., 2019]. From the residual strain they calculated the full residual anisotropic stress state and the mean stress by using the elastic properties of quartz. The authors showed that the entrapment pressures calculated from this mean stress with the isotropic model for host-inclusion systems differ from the known synthesis pressure by <0.2 GPa, which is on the order of the combined experimental uncertainties. Their results show that the most significant effect of the elastic anisotropy of quartz is on the Raman shifts of the inclusion, and not on the subsequent calculation of entrapment conditions.


Download here the compressed folder containing the input file, the project file and the MATLAB® script that will be used in this tutorial.

Add new analyses: set the host-inclusion system and import the measured residual strains

The first step is to set the host and the inclusion minerals and to import your analyses into EntraPT (you can learn here what an analysis is in EntraPT).

The new analyses are added from the Add New Analyses window (Fig. 1-a). This window has a panel on the right to navigate through the Host&Inclusion (Fig. 1-b) and Strain pages (Fig. 1-c), where all of the parameters that define an analysis can be set.

Set the host and inclusion minerals

Fig. 1

Since all of the measurements refer to quartz inclusions in almandine, you need to set select almandine_milani2015 as the host and quartz as the inclusion from the drop down list in the Host&Inclusion page (Fig. 1-d,e). Confirm your choice with the Confirm and Set Strain button (Fig. 1-f). This will lead you to the next page.


The calculations performed in Bonazzi et al. [2019] used the equation of state (EoS) for almandine labeled as almandine_milani2015. Since then, newer EoS for garnet end-members have become available (from Angel et al. [2022]). We recommend that you use the newer EoS labeled as angel2022 for your calculations other than this tutorial. See here what has changed.

Set the host and inclusion minerals

Fig. 2

In the Strain page (Fig. 2-a) you will set the strains of the quartz inclusions in almandine. Since all the measurements belongs to the same host-inclusion system with the same mineral phases, you can choose to import the strains for multiple analyses. Click on the Multiple Analyses (Fig. 2-b) option and then on Import File (Fig. 2-c). A file-dialog is opened from which you choose an input file (with *.dat extension) from your computer. Select the *.dat file that you have downloaded from here, which contains the data of the ideal inclusions from the Tables 2a and 2b of Bonazzi et al. [2019].


Since the inclusions (quartz) are uniaxial, the values \(𝜀_1 = 𝜀_2\) and \(𝜀_3\) together with their esd and covariance are given in the *.dat file formatted for uniaxial inclusions. Input files formatted for different symmetries are also available. See here a description of the format of these files.

When you confirm, the input file is loaded to EntraPT and the consistency check is performed. A pop-up window will show a summary of the analyses that have passed the checks and those that have not. The data of the analyses that passed all the checks are displayed in a table (Fig. 2-d).

Click Add analyses to workspace (Fig. 2-e) to add these analyses to the Workspace (Fig. 2-f). The analyses are now stored in the current project, and can be selected from the workspace for calculations or to show their data in plots.

Visual analysis of the residual strain

Once the measured strains are stored in the project, the user can at any time perform a visual analysis of the residual strain from the Plot Strain page (Fig. 3-b) in the View Data window (Fig. 3-a) .

Set the host and inclusion minerals

Fig. 3

Select all the analyses from the Workspace (Fig. 3-c) (see here how) to show their residual strains in a plot of \(𝜀_1\) vs \(𝜀_3\). The error bars and confidence ellipses obtained from the esd and covariances on the residual strain are also displayed.

You can choose for which of the selected analyses the labels and the confidence ellipses are shown, from the panel shown in Fig. Fig. 3 - d. Click on Refresh Plot to update the plot and see the changes.

The isochors and the lines of isotropic strain and hydrostatic stress can be also added to the plot, by selecting them from the panel of Fig. 3-e. Click on Refresh Plot to update the plot. The same plot as Fig. 5a of Bonazzi et al. [2019] will be displayed with the addition of the confidence ellipses of each analysis.

You can change the variables shown on the x and y axes (Fig. Fig. 3 - f,g). For some symmetries of the inclusion, some of these choices are equivalent (for example, for uniaxial inclusions \(ε_1 = ε_2\)). Also in this case, click on Refresh Plot to update the plot and see the changes. Note that not all the combinations are currently supported.

Use the Plot settings (Fig. Fig. 3-h) to set the P and T range of the axes.

The buttons in the toolbar of the plot (Fig. 3-i) allow the user to select any point on the plot to get its coordinates, and to zoom in and out. From here, the plot can be directly exported as a picture in several formats.

You can also filter the list on analyses displayed in the Workspace. As an example, by typing “Alm1” in the search tool (Fig. 3-j), you can filter the analyses of the first experiment of Bonazzi et al. [2019].

Calculate the entrapment isomekes

The entrapment conditions are calculated from the Calculate Entrapment window (Fig. 4-a). Select one or more analyses from the Workspace (see here how) (Fig. 4-b) to calculate their entrapment isomekes.

Set the host and inclusion minerals

Fig. 4

You can set the range of temperatures for the calculation of the entrapment isomekes using the Tmin, Tmax and Tstep fields in this window (Fig. 4-c). Initially, the units for temperature (Tscale) and for the pressure (Pscale) are set to °C and GPa respectively, but other options are K and kbar, respectively. See here how to change the pressure and temperature units.

The inclusions in the dataset that we are using for this tutorial were synthesized by Bonazzi et al. [2019] in two experiments conducted at 3 GPa, 775 °C (Alm1) and 2.5 GPa, 800 °C (Alm2). Therefore, setting Tmin = 750 °C, Tmax = 850 °C, Tstep = 5 °C as the temperature range for the calculation of the entrapment isomeke is a good choice for the inclusions of both experiments. The final conditions at which the residual strain was measured are always assumed to be room conditions (T = 25 °C or 298 K, P = 0 GPa or 0 kbar) (Fig. 4-d).

Bonazzi et al. [2019] calculated the residual pressure from the measured residual strain by two different approaches. In the first approach the residual stress is obtained from the strain applying the elastic stiffness tensor (\(C_{ij}\)) of the inclusion. In the second approach, the equation of state (EoS) of the inclusion is used to obtain the residual pressure from the residual volume strain of the inclusion. EntraPT implements both these two approaches. You can choose one or both the approaches from the Expert Mode panel (Fig. 4-e). By default, the Expert Mode panel is not active, but can be activate from the Settings menu in the top bar of EntraPT. The chosen residual pressure(s) will be used for the calculation of the entrapment isomeke.

For the current example, we will calculate the residual pressure using both methods (Fig. 4-e). Select all the analyses from the Workspace, and click Calculate (Fig. 4-f). The calculation of the entrapment isomeke of all the analsyses is run at once with the same parameters (Tend, Tmax, Tstep). Once the calculation is completed, the results are saved to the current project and can be viewed from the View Data window.

You can also calculate the entrapment isomekes for each analysis independently by selecting one at time from the Workspace and setting the appropriate calculation parameters.

Read here further details on the calculation of the entrapment isomekes.

View and plot the results

The results from each analysis can be viewed from the View Data window (Fig. 5-a).

Set the host and inclusion minerals

Fig. 5

By selecting one analysis from the Workspace, the Details page (Fig. 5-b) shows all of the details of the selected analysis such as the label, the notes, the host-inclusion system, and the residual strain. The Results page (Fig. 5-c) shows all of the numerical results of the calculations for the selected analysis (residual pressure determined with each model, the P-T points on the isomekes, and all of the uncertainties).

The Plot Isomekes page (Fig. 5-d) shows a P-T graph reporting the isomekes calculated for each analysis (Fig. 5-e). Select one analysis from the Workspace to plot the isomeke(s) obtained using the models selected for the calculation, with their estimated uncertainties shown as a shaded area. The uncertainties on the isomekes are estimated assuming an uncertainty equal to one standard deviation on the residual pressure.

You can selectively hide or show one or more objects of the plot (isomekes, shaded area of the uncertainty, legend, labels) from the panel in Fig. 5-f,g. Remember to click on Refresh Plot to update the plot.

Use the Plot settings (Fig. 5-h) to set the P and T range of the axes. The buttons in the toolbar of the plot (Fig. 5-i) allow the user to select any point on the plot to get its coordinates, and to zoom in and out. From here, the plot can be directly exported as a picture in several formats.

The user can also generate a plot with the isomekes of multiple analyses by selecting two or more from the Workspace. Specific analyses or groups of analyses can be filter by using the search tool below the Workspace (Fig. 5-j).

Export project: save data to your computer and further processing

You can export all the data of the current project as a project file from the File -> Export Project menu in the to bar of EntraPT. Project files can be imported back into EntraPT, using the File -> Import Project menu, to view the data, and generate new plots. Read more about project files here.

The *.ept project file can be opened and processed using MATLAB®. Short scripts can be implemented to rapidly produce custom plots that are not directly displayed in EntraPT, taking advantage that all of the data are structured consistently in the project file.

Set the host and inclusion minerals

Fig. 6

An example is the plot of the entrapment pressures as a function of the residual differential stress (Fig. 6). It has been generated externally with the MATLAB® script provided here, using the data contained in the project file created with this tutorial.

During the export procedure from EntraPT, the user can also choose to save the data to spreadsheets (with *.xlsx extension) that can be read by any commonly used spreadsheet application, such as Microsoft Excel® or LibreOffice®. In this case an individual spreadsheet is created for each analysis. A compressed folder, with *.zip extension, is created that contains the *.ept project file and one or more folders containing the spreadsheet files.